import * as React from 'react';
type ReactNode = React.ReactNode;

<% data.slice(1).reverse().forEach(function(component) {%>
declare class <%= component.name%> extends React.Component<<%= component.name%>Props, {}> {
  render(): JSX.Element;
}
<% }); %>

declare class <%= data[0].name%> extends React.Component<<%= data[0].name%>Props, {}> { 
  <% data.slice(1).forEach(function(c){%>static <%= c.name.replace(data[0].name, '')%>: typeof <%= c.name %>;
  <%});%>
  render(): JSX.Element;
}
<% data.forEach(function(component){ %>
export interface <%= component.name%>Props {
  <% component.props.forEach(function({ attribute, type, def, desc }){%>
    /**
     * desc: <%- desc%>
     * default: <%- def %>
     */
    <%= attribute%>?: <%- type%>;
  <% }); %>
}
<% }) %>
export default <%= data[0].name%>;
